package com.wei.wiki.service.impl;

import com.wei.wiki.service.WebSocketService;
import com.wei.wiki.websocket.WebSocketServer;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/*
 * @author : ShunWei
 * @date : 2022/1/31 9:32
 * @Description:
 */
@Service
public class WebSocketServiceImpl implements WebSocketService {
    @Resource
    private WebSocketServer webSocketServer;

    @Override
    @Async
    public void sendInfo(String info) {
        webSocketServer.sendInfo(info);
    }
}
